package com.alm.token.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.alm.token.ui.activity.BlockWalletLoginActivity;
import com.alm.token.utils.CommonUtil;


public class MyReceiver extends BroadcastReceiver {
    private final String tag = getClass().getSimpleName();

    @Override
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        //LogUtil.d("广播进来了:" + action);
        if ("babiho.intent.action.UPDATE_MAIN".equals(action)) {
            if (!CommonUtil.isActivityRunning(context, BlockWalletLoginActivity.class.getName())) {
//                Intent intent2 = new Intent(context, BlockWalletLoginActivity.class);
//                intent2.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//                context.startActivity(intent2);
            }
        } else if ("android.intent.action.BOOT_COMPLETED".equals(action)) {
//            Intent mIntent = new Intent(context, BlockWalletLoginActivity.class);
//            mIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//            context.startActivity(mIntent);
        }
    }
}
